import request from "@/utils/request";

export function getCourse(page, limit, data) {
  return request({
    url: `/admin/vod/course/${page}/${limit}`,
    method: "post",
    data,
  });
}
export function courseInfo(data) {
  return request({
    url: `/admin/vod/course/save`,
    method: "post",
    data,
  });
}
export function getCourseInfoById(id) {
  return request({
    url: `/admin/vod/course/get/${id}`,
    method: "get",
  });
}
export function updateCourseInfo(data) {
  return request({
    url: `/admin/vod/course/update`,
    method: "post",
    data,
  });
}
//根据课程id查询课程发布信息
export function getCoursePublishVo(id) {
  return request({
    url: `/admin/vod/course/getCoursePublishVo/${id}`,
    method: "get",
  });
}
//课程最终发布
export function publishCourse(id) {
  return request({
    url: `/admin/vod/course/publishCourse/${id}`,
    method: "get",
  });
}
//删除课程
export function removeCourse(id) {
  return request({
    url: `/admin/vod/course/removeCourse/${id}`,
    method: "delete",
  });
}
